- The XBRL Standard
- XBRL Specifications
- Registries
- Functions Registry 1.0
- Functions Registry
- xfi:unit-denominator
- 80104:
Function test for xfi:unit-denominator
Documentation
Tests of function xfi:unit-denominator($unit as element(xbrli:unit)) as element(xbrli:measure)*
Owners
Name
|
Affiliation
|
Email
|
Start
|
End
|
Herm Fischer |
UBMatrix / Mark V Systems
|
fischer@markv.com |
23-01-2008 at 00:00:00 |
|
References
http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670670
Test Case Variations
V-01
Returns no measure for denominator-less unit-squareMiles
Documentation
Tests that element returned is unit for specified item.
Inputs
Outputs
-
Result test:
empty( $result )
V-02
Returns correct measures for single-divisor unit
Documentation
Tests that elements returned are measures for specified item.
Inputs
Outputs
-
Result test:
$result instance of element(xbrli:measure)* and
count( $result ) eq 1 and
$result is //xbrli:unit[@id eq 'unit-speedKMH']/xbrli:divide/xbrli:unitDenominator/xbrli:measure
V-03
Returns measure for divide based unit
Documentation
Inputs
Outputs
-
Result test:
$result instance of element(xbrli:measure)+ and
count( $result ) eq 2 and
count( $result[local-name() eq 'measure' and
local-name-from-QName(.) eq 'seconds'] ) eq 2
V-04
Returns measure for inverse unit (1/secs)
Documentation
Inputs
Outputs
-
Result test:
$result instance of element(xbrli:measure)* and
count( $result ) eq 1 and
$result eq QName('http://xbrl.org/formula/conformance/example', 'concept:seconds')
V-05
Wrong node to function
Documentation
XPath-defined error for node type incorrect.
Inputs
Outputs
-
Error code: xqt-err:XPTY0004
V-06
A sequence of items as argument
Documentation
XPath-defined error for node type incorrect arity of arguments.
Inputs
Outputs
-
Error code: xqt-err:XPTY0004
V-07
Wrong number of arguments to function
Documentation
XPath-defined error for node type incorrect number of arguments.
Inputs
- schema: unit-test-concepts.xsd
- instance: unit-test-instance.xml
(DTS Discovery starting point)
(ID=V07)
-
Function Call:
xfi:unit-denominator( //xbrli:unit[@id eq 'unit-speedMPH'],
//xbrli:unit[@id eq 'unit-speedKMH'] )
(against file V07)
Outputs
-
Error code: xqt-err:XPST0017
Revisions
Name
|
On
|
Details
|
Herm Fischer |
23-01-2008 at 00:00:00 |
Created the test case.
|
Herm Fischer |
05-02-2008 at 00:00:00 |
Added variation for a tuple.
|